﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace mas_apredizaje
{
    public partial class Resultados : Form
    {
        public Resultados()
        {
            InitializeComponent();
        }
        BD.Metodos m = new BD.Metodos();
        private void button1_Click(object sender, EventArgs e)
        {

            datagrid.DataSource = m.resultados();
            datagrid.DataMember = "resultados";
            if (datagrid.Rows.Count == 0)
            {
                MessageBox.Show("No se han encontrado resultados para tu búsqueda", " ", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                datagrid.Columns[0].ReadOnly = true;
                datagrid.Columns[1].ReadOnly = true;               
                datagrid.Columns[2].ReadOnly = true;
                datagrid.Columns[3].ReadOnly = true;
                //datagrid.Columns[4].ReadOnly = true;                
            }
        }
    }
}
